<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateProductImagesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('product_images', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->integer('product_id')->default(0)->comment('关联products表 的id');
			$table->boolean('type')->comment('商品图片类型 product_image_types 表ID');
			$table->string('key')->nullable()->comment('商品的图标，boskey');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('product_images');
	}

}
